# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=php-rfi-payload-decoder
pkgver=30.bd42caa
pkgrel=2
groups=('blackarch' 'blackarch-cracker' 'blackarch-nfc')
pkgdesc='Decode and analyze RFI payloads developed in PHP.'
url='https://github.com/bwall/PHP-RFI-Payload-Decoder'
arch=('any')
license=('BSD')
depends=('php' 'apache')
makedepends=('git')
source=("$pkgname::git+https://github.com/bwall/PHP-RFI-Payload-Decoder.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a Decoder "$pkgdir/usr/share/$pkgname/Decoder"
  cp -a DecodingServer "$pkgdir/usr/share/$pkgname/DecodingServer"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

